﻿@model IEnumerable<Stardust.Models.HabitacionBean>

@{
    ViewBag.Title = "Habitaciones";
}

<h2>@ViewBag.Title</h2>

<p>
    <a href="@Url.Action("Create")"><img src="@Url.Content("~/Content/images/icons/color/plus.png")" alt="Create" />Añadir habitación</a>
</p>

<div class="wrapper">
    <div class="widget">
        <div class="title">
            <img src="@Url.Content("~/Content/images/icons/dark/list.png")" alt class="titleIcon">
            <h6>Lista de Habitaciones</h6>
        </div>
        <div class="dataTables_wrapper">
            <table cellpadding = "0" cellspacing = "0" width = "100%" class = "display dTable">
                <thead>
                    <tr>
                        <th class="ui-state-default" rowspan="1" colspan="1" style="width:170px;" >
                            <div class="DataTables_sort_wrapper">
                            Hotel
                            <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                            </div>
                        </th>
                        <th class="ui-state-default" rowspan="1" colspan="1" style="width:170px;" >
                            <div class="DataTables_sort_wrapper">
                            Tipo de Habitación
                            <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                            </div>
                        </th>
                        <th class="ui-state-default" rowspan="1" colspan="1" style="width:170px;" >
                            <div class="DataTables_sort_wrapper">
                            Piso
                            <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                            </div>
                        </th>
                        <th class="ui-state-default" rowspan="1" colspan="1" style="width:170px;" >
                            <div class="DataTables_sort_wrapper">
                            Opciones
                            <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                            </div>
                        </th>

                    </tr>
                </thead>

                <tbody>
                @foreach (var item in Model) {
                    <tr class="gradeA odd">
                        <td>@Html.DisplayFor(modelItem => item.nombreHotel )</td>
                        <td>@Html.DisplayFor(modelItem => item.nombreTipoHabitacion )</td>
                        <td>@Html.DisplayFor(modelItem => item.piso )</td>
                        <td>
                            <a href="@Url.Action("Edit", new { id = item.ID })"><img src="@Url.Content("~/Content/images/icons/color/pencil.png")" alt="Edit" />Editar </a> | 
                            <a href="@Url.Action("Details", new { id = item.ID })"><img src="@Url.Content("~/Content/images/icons/color/edit-column.png")" alt="Details" />Detalles</a> | 
                            <a href="@Url.Action("Delete", new { id = item.ID })"><img src="@Url.Content("~/Content/images/icons/color/cross.png")" alt="Delete" />Borrar</a>
                        </td>
                    </tr>
        
                }
                </tbody>
            </table>
        </div>
    </div>
</div>